<!DOCTYPE html>
<html lang="cn">
<head>
    <meta charset="UTF-8">
    <title>Document</title>
    <style type="text/css"></style>
</head>
<body>
    <h1>JS 改变元素的属性</h1>
    <button onclick="makeBig()">变大</button>
    <hr>

    <img src="./1.jpg" width="0" id="myimg">

    <script>

        function makeBig() {
            var myimg = document.getElementById('myimg');
            myimg.width += 50;
            console.log(myimg.width);
        }

    </script>
</body>
</html>